/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

/**
 * 共配派费直发
 *  */
import React, { PureComponent } from 'react';
import StandardTab from '@/components/StandardTab';
import PageHeaderLayout from '@/layouts/PageHeaderLayout';
import styles from './style.less';
import DispatSetting from './components/DispatSetting';
import DispatStatistics from './components/DispatStatistics';

export default class Dispatch extends PureComponent {
  state = {
    activeKey: '',
  };

  render() {
    const { activeKey } = this.state;
    const panes = [
      {
        tab: '统计报表',
        component: <DispatStatistics />,
      },
      {
        tab: '设置',
        component: <DispatSetting />,
      },
    ];
    return (
      <PageHeaderLayout title="派费直发">
        <div className={styles.main}>
          <div style={{ paddingBottom: '24px', position: 'relative' }}>
            <StandardTab
              style={{ marginBottom: 24 }}
              onChange={key => {
                this.setState({
                  activeKey: key,
                });
              }}
              activeKey={activeKey}
              name="test123"
              panes={panes}
            />
          </div>
        </div>
      </PageHeaderLayout>
    );
  }
}
